package com.lantosec.hmrp.modules.workflow.enumeration;

/**
 * 任务会签类型
 */
public enum TaskCountersignTypeEnum {
    // 会签类型（RATIO 通过比例， ONE_VOTE 一票权）
    RATIO("RATIO","通过比例"),
    ONE_VOTE("ONE_VOTE", "一票权");

    private String type;
    private String name;

    private TaskCountersignTypeEnum(String type, String name) {
        this.type = type;
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static TaskCountersignTypeEnum getByType(String type) {
        for (TaskCountersignTypeEnum item : TaskCountersignTypeEnum.values()) {
            if (item.getType().equals(type)) {
                return item;
            }
        }
        return TaskCountersignTypeEnum.RATIO;
    }
}
